<template>
    <div style="color: red;width: 340px;margin: 20px auto;">{{ 调用vueRemote }}
        <img :src="img2" style="width:340px;height:220px;object-fit: cover;">
        <img src="../assets/ds_img1.png" style="width:340px;height:220px;margin-top: 15px;">
        <button @click="addTips" style="font-size: 16px;margin:10px 0;padding: 2px 8px;">点击</button>
        <div style="font-size: 16px;">点击次数:{{count}}</div>
    </div>
</template>
    
<script>
import {ref} from 'vue'
export default {
    data() {
    return {
      title: "vue3--host 页面",
      count:0,
      img2:"https://p1.music.126.net/cKDI1r6YkyCgG6GDSXE_Xw==/109951165380673643.jpg"
    }
  },
    methods: {
 
    addTips() {
      this.count++
      sessionStorage.setItem('test',1111)
      this.$emit("addTips",this.title)
      console.log(this.count)
    }
  }
    // setup(){
    //     const count = ref('');
    //     const img2=ref("https://p1.music.126.net/cKDI1r6YkyCgG6GDSXE_Xw==/109951165380673643.jpg")
    //     const addTips=()=>{
    //       count.value++
    //       $emit("addTips",count.value)
    //       console.log(count.value)
    //     }
    //     return {img2,addTips,count}
    // }    
}
</script>
    